home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / time / fmtclock < prev    next >
Encoding:
Text File  |  1993-10-26  |  2.4 KB  |  50 lines  |  [TEXT/$Tcl]

  1.  
  2.  
  3.           fmtclock clockval ?format? ?GMT|{}?
  4.                Converts a Unix integer time value, typically  returned
  5.                by  getclock,  convertclock,  or  the  atime, mtime, or
  6.                ctime options of the file  command,  to  human-readable
  7.                form.   The  format argument is a string that describes
  8.                how the date and  time  are  to  be  formatted.   Field
  9.                descriptors  consist  of  a  ``%''  followed by a field
  10.                descriptor character.  All other characters are  copied
  11.                into the result.  Valid field descriptors are:
  12.  
  13.                    %% - Insert a %.
  14.                    %a - Abbreviated weekday name.
  15.                    %A - Full weekday name
  16.                    %b - Abbreviated month name.
  17.                    %B - Full month name.
  18.                    %d - Day of month (01 - 31).
  19.                    %D - Date as %m/%d/%y.
  20.                    %e - Day of month (1-31), no leading zeros.
  21.                    %h - Abbreviated month name.
  22.                    %H - Hour (00 - 23).
  23.                    %I - Hour (00 - 12).
  24.                    %j - Day number of year (001 - 366).
  25.                    %m - Month number (01 - 12).
  26.                    %M - Minute (00 - 59).
  27.                    %n - Insert a new line.
  28.                    %p - AM or PM.
  29.                    %r - Time as %I:%M:%S %p.
  30.                    %R - Time as %H:%M.
  31.                    %S - Seconds (00 - 59).
  32.                    %t - Insert a tab.
  33.                    %T - Time as %H:%M:%S.
  34.                    %U - Week number of year (01 - 52), Sunday is the first
  35.                         day of the week.
  36.                    %w - Weekday number (Sunday = 0).
  37.                    %W - Week number of year (01 - 52), Monday is the first
  38.                         day of the week.
  39.                    %x - Local specific date format.
  40.                    %X - Local specific time format.
  41.                    %y - Year within century (00 - 99).
  42.                    %Y - Year as ccyy (e.g. 1990)
  43.                    %Z - Time zone name.
  44.  
  45.                If format is not specified, "%a %b %d %H:%M:%S  %Z  %Y"
  46.                is  used.   If  GMT is specified, the time will be for-
  47.                mated as Greenwich Mean Time. If the  argument  is  not
  48.                specified  or is empty, then the local timezone will be
  49.                used as defined by the TIMEZONE environment variable.
  50.